package com.dragon.modules.yuegou.query.product;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.product.CoupMemberRecordEntity;
import com.dragon.modules.yuegou.enums.product.CoupMemberRecordType;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 会员领取记录表 动态查询条件
 *
 * @author pbuilder generated
 * @date 2021-05-19 15:40:43
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class CoupMemberRecordQuery extends CoupMemberRecordEntity implements Query<CoupMemberRecordEntity>{

	/** ID查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

	/** 商户商品券id查询条件 */
	@JsonUnwrapped(prefix = "merchantCoupId")
	private Condition<String> merchantCoupIdCondition;

	/** 券模板ID查询条件 */
	@JsonUnwrapped(prefix = "coupTemplateId")
	private Condition<String> coupTemplateIdCondition;

	/** 订单号查询条件 */
	@JsonUnwrapped(prefix = "orderNo")
	private Condition<String> orderNoCondition;

	/** [枚举]类型：0-未使用-UNUSE、1-已使用-USED、2-已过期-EXPIRED查询条件 */
	@JsonUnwrapped(prefix = "type")
	private Condition<CoupMemberRecordType> typeCondition;

	/** 商户ID（冗余）查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

	/** 领取数量查询条件 */
	@JsonUnwrapped(prefix = "quantity")
	private Condition<Integer> quantityCondition;

	/** 会员ID查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

	/** 创建人（优惠券发放人）查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

	/** 领取时间查询条件 */
	@JsonUnwrapped(prefix = "drawTime")
	private Condition<LocalDateTime> drawTimeCondition;

	/** 使用时间查询条件 */
	@JsonUnwrapped(prefix = "usedTime")
	private Condition<LocalDateTime> usedTimeCondition;

	/** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public CoupMemberRecordQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 *
	 * @param entity 实体对象
	 */
	public CoupMemberRecordQuery(CoupMemberRecordEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 *
	 * @param other 查询条件对象
	 */
	public CoupMemberRecordQuery(CoupMemberRecordQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.merchantCoupIdCondition != null) {
			this.merchantCoupIdCondition = other.merchantCoupIdCondition.copy();
		}
		if(other.coupTemplateIdCondition != null) {
			this.coupTemplateIdCondition = other.coupTemplateIdCondition.copy();
		}
		if(other.orderNoCondition != null) {
			this.orderNoCondition = other.orderNoCondition.copy();
		}
		if(other.typeCondition != null) {
			this.typeCondition = other.typeCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.quantityCondition != null) {
			this.quantityCondition = other.quantityCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.drawTimeCondition != null) {
			this.drawTimeCondition = other.drawTimeCondition.copy();
		}
		if(other.usedTimeCondition != null) {
			this.usedTimeCondition = other.usedTimeCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<CoupMemberRecordEntity> toQueryWrapper() {
		QueryWrapper<CoupMemberRecordEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (merchantCoupIdCondition != null) {
			merchantCoupIdCondition.toWrapper(wrapper, COL_MERCHANT_COUP_ID);
		}
		if (coupTemplateIdCondition != null) {
			coupTemplateIdCondition.toWrapper(wrapper, COL_COUP_TEMPLATE_ID);
		}
		if (orderNoCondition != null) {
			orderNoCondition.toWrapper(wrapper, COL_ORDER_NO);
		}
		if (typeCondition != null) {
			typeCondition.toWrapper(wrapper, COL_TYPE);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (quantityCondition != null) {
			quantityCondition.toWrapper(wrapper, COL_QUANTITY);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (drawTimeCondition != null) {
			drawTimeCondition.toWrapper(wrapper, COL_DRAW_TIME);
		}
		if (usedTimeCondition != null) {
			usedTimeCondition.toWrapper(wrapper, COL_USED_TIME);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回ID查询条件
	 *
	 * @return idCondition ID查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}

	/**
	 * 获取ID查询条件
	 *
	 * @return idCondition ID查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置ID查询条件
	 *
	 * @param idCondition ID查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商户商品券id查询条件
	 *
	 * @return merchantCoupIdCondition 商户商品券id查询条件
	 */
	public Condition<String> merchantCoupId() {
		this.merchantCoupIdCondition = new Condition<>();
		return this.merchantCoupIdCondition;
	}

	/**
	 * 获取商户商品券id查询条件
	 *
	 * @return merchantCoupIdCondition 商户商品券id查询条件
	 */
	public Condition<String> getMerchantCoupIdCondition() {
		return merchantCoupIdCondition;
	}

	/**
	 * 设置商户商品券id查询条件
	 *
	 * @param merchantCoupIdCondition 商户商品券id查询条件
	 */
	public void setMerchantCoupIdCondition(Condition<String> merchantCoupIdCondition) {
		this.merchantCoupIdCondition = merchantCoupIdCondition;
	}

	/**
	 * 构造并返回券模板ID查询条件
	 *
	 * @return coupTemplateIdCondition 券模板ID查询条件
	 */
	public Condition<String> coupTemplateId() {
		this.coupTemplateIdCondition = new Condition<>();
		return this.coupTemplateIdCondition;
	}

	/**
	 * 获取券模板ID查询条件
	 *
	 * @return coupTemplateIdCondition 券模板ID查询条件
	 */
	public Condition<String> getCoupTemplateIdCondition() {
		return coupTemplateIdCondition;
	}

	/**
	 * 设置券模板ID查询条件
	 *
	 * @param coupTemplateIdCondition 券模板ID查询条件
	 */
	public void setCoupTemplateIdCondition(Condition<String> coupTemplateIdCondition) {
		this.coupTemplateIdCondition = coupTemplateIdCondition;
	}

	/**
	 * 构造并返回订单号查询条件
	 *
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> orderNo() {
		this.orderNoCondition = new Condition<>();
		return this.orderNoCondition;
	}

	/**
	 * 获取订单号查询条件
	 *
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> getOrderNoCondition() {
		return orderNoCondition;
	}

	/**
	 * 设置订单号查询条件
	 *
	 * @param orderNoCondition 订单号查询条件
	 */
	public void setOrderNoCondition(Condition<String> orderNoCondition) {
		this.orderNoCondition = orderNoCondition;
	}

	/**
	 * 构造并返回[枚举]类型：0-未使用-UNUSE、1-已使用-USED、2-已过期-EXPIRED查询条件
	 *
	 * @return typeCondition [枚举]类型：0-未使用-UNUSE、1-已使用-USED、2-已过期-EXPIRED查询条件
	 */
	public Condition<CoupMemberRecordType> type() {
		this.typeCondition = new Condition<>();
		return this.typeCondition;
	}

	/**
	 * 获取[枚举]类型：0-未使用-UNUSE、1-已使用-USED、2-已过期-EXPIRED查询条件
	 *
	 * @return typeCondition [枚举]类型：0-未使用-UNUSE、1-已使用-USED、2-已过期-EXPIRED查询条件
	 */
	public Condition<CoupMemberRecordType> getTypeCondition() {
		return typeCondition;
	}

	/**
	 * 设置[枚举]类型：0-未使用-UNUSE、1-已使用-USED、2-已过期-EXPIRED查询条件
	 *
	 * @param typeCondition [枚举]类型：0-未使用-UNUSE、1-已使用-USED、2-已过期-EXPIRED查询条件
	 */
	public void setTypeCondition(Condition<CoupMemberRecordType> typeCondition) {
		this.typeCondition = typeCondition;
	}

	/**
	 * 构造并返回商户ID（冗余）查询条件
	 *
	 * @return merchantIdCondition 商户ID（冗余）查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}

	/**
	 * 获取商户ID（冗余）查询条件
	 *
	 * @return merchantIdCondition 商户ID（冗余）查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置商户ID（冗余）查询条件
	 *
	 * @param merchantIdCondition 商户ID（冗余）查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回领取数量查询条件
	 *
	 * @return quantityCondition 领取数量查询条件
	 */
	public Condition<Integer> quantity() {
		this.quantityCondition = new Condition<>();
		return this.quantityCondition;
	}

	/**
	 * 获取领取数量查询条件
	 *
	 * @return quantityCondition 领取数量查询条件
	 */
	public Condition<Integer> getQuantityCondition() {
		return quantityCondition;
	}

	/**
	 * 设置领取数量查询条件
	 *
	 * @param quantityCondition 领取数量查询条件
	 */
	public void setQuantityCondition(Condition<Integer> quantityCondition) {
		this.quantityCondition = quantityCondition;
	}

	/**
	 * 构造并返回会员ID查询条件
	 *
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}

	/**
	 * 获取会员ID查询条件
	 *
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID查询条件
	 *
	 * @param memberIdCondition 会员ID查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回创建人（优惠券发放人）查询条件
	 *
	 * @return createdByCondition 创建人（优惠券发放人）查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}

	/**
	 * 获取创建人（优惠券发放人）查询条件
	 *
	 * @return createdByCondition 创建人（优惠券发放人）查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建人（优惠券发放人）查询条件
	 *
	 * @param createdByCondition 创建人（优惠券发放人）查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回领取时间查询条件
	 *
	 * @return drawTimeCondition 领取时间查询条件
	 */
	public Condition<LocalDateTime> drawTime() {
		this.drawTimeCondition = new Condition<>();
		return this.drawTimeCondition;
	}

	/**
	 * 获取领取时间查询条件
	 *
	 * @return drawTimeCondition 领取时间查询条件
	 */
	public Condition<LocalDateTime> getDrawTimeCondition() {
		return drawTimeCondition;
	}

	/**
	 * 设置领取时间查询条件
	 *
	 * @param drawTimeCondition 领取时间查询条件
	 */
	public void setDrawTimeCondition(Condition<LocalDateTime> drawTimeCondition) {
		this.drawTimeCondition = drawTimeCondition;
	}

	/**
	 * 构造并返回使用时间查询条件
	 *
	 * @return usedTimeCondition 使用时间查询条件
	 */
	public Condition<LocalDateTime> usedTime() {
		this.usedTimeCondition = new Condition<>();
		return this.usedTimeCondition;
	}

	/**
	 * 获取使用时间查询条件
	 *
	 * @return usedTimeCondition 使用时间查询条件
	 */
	public Condition<LocalDateTime> getUsedTimeCondition() {
		return usedTimeCondition;
	}

	/**
	 * 设置使用时间查询条件
	 *
	 * @param usedTimeCondition 使用时间查询条件
	 */
	public void setUsedTimeCondition(Condition<LocalDateTime> usedTimeCondition) {
		this.usedTimeCondition = usedTimeCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 *
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}

	/**
	 * 获取创建时间查询条件
	 *
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 *
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

}
